#ifndef SIDEBUTTON_H
#define SIDEBUTTON_H

#include <QAbstractButton>

#define SideButtonHeight    (22)

class SideButton : public QAbstractButton
{
public:
    typedef enum
    {
        North,
        West,
        East
    } Direction;

    explicit SideButton(Direction direction, QWidget *parent = nullptr);
    void setContent(const QPixmap &icon, const QString &text);

protected:
    void enterEvent(QEvent *) override;
    void leaveEvent(QEvent *) override;
    void paintEvent(QPaintEvent *e) override;

private:
    QPixmap m_content;
    Direction m_direction;
    int m_contentLeft, m_contentTop;
    bool m_isHover;
};

#endif // SIDEBUTTON_H
